package com.xt.base.model.system;

import java.util.Set;

import com.xt.base.dao.hibernate.code.IAutoCreateCode;
import com.xt.base.model.base.Organization;
import com.xt.base.model.dictionary.ApplicationType;
import com.xt.base.pojo.BasePOJO;

/**
 * 应用部署信息 <br>
 * 
 * <p>
 * <a href="Application.java.html"><i>查看源文件</i></a>
 * </p>
 * 
 * @author 杨洪波
 * @version $Revision: $<br>
 *          $Id: $
 * @hibernate.class table="Application" batch-size="200" dynamic-update="true" dynamic-insert="true"
 */
public class Application extends BasePOJO implements IAutoCreateCode{

	private static final long serialVersionUID = 358475805278534616L;
	
	/** 服务器名称 */
	private String name;

	/** 服务器的应用类型 */
	private ApplicationType appType;

	/** 服务器的Url地址 */
	private String url;

	/** 服务器的描述 */
	private String description;
	
	/**服务器同步加权码*/
	private int mark=1;

	/** 该应用服务的顶级管理机构 */
	private Set<Organization> topOrganizations;

	/**
	 * @hibernate.many-to-one column = "ApplicationType_ID" not-null="true" lazy="true"
	 * @return 应用分类
	 */
	public ApplicationType getAppType() {
		return appType;
	}

	public void setAppType(ApplicationType appType) {
		this.appType = appType;
	}

	/**
	 * @hibernate.property column="Description"
	 *                     length="200"
	 * 
	 * @return 服务器的描述
	 */
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @hibernate.property column="Mark" not-null="true" unique="true"
	 * @return 服务器同步加权码 
	 */
	public int getMark() {
		return mark;
	}

	public void setMark(int mark) {
		this.mark = mark;
	}

	/**
	 * @hibernate.property column="Name" not-null="true"
	 * 
	 * @return 服务器名称
	 * 
	 */
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @hibernate.set table="OrganizationApplications"  inverse="true" cascade="save-update" lazy="true"
	 * @hibernate.collection-key column="ApplicationID"
	 * @hibernate.collection-many-to-many 
	 * 			class="com.xt.base.model.base.Organization" column="OrganizationID"
 	 * @return 该应用服务的顶级管理机构
	 */
	public Set<Organization> getTopOrganizations() {
		return topOrganizations;
	}

	public void setTopOrganizations(Set<Organization> topOrganizations) {
		this.topOrganizations = topOrganizations;
	}

	/**
	 * @hibernate.property column="Url" length="200" not-null="true"
	 *                     unique="true"
	 * 
	 * @return 服务器的Url地址
	 */
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	

}
